import http from "@/api";
import { ReqPage, ResPage } from "../interface";

/**
 * @name 消息通知模块
 */
// * 查询通知记录列表
export const getNotifyRecordList = (params: ReqPage) => {
	return http.get<ResPage<Menu.MenuInfo>>(`/notification/record/find`, params);
};
// * 查询通知模板列表
export const getNotifyTemplateList = (params: any) => {
	return http.get<any>(`/notification/template/find`, params);
};
// * 添加通知模板
export const addNotifyTemplateList = (params: any) => {
	return http.post(`/notification/template/add`, params);
};
// * 编辑通知模板
export const modifyNotifyTemplateList = (params: any) => {
	return http.post(`/notification/template/modify`, params);
};
// * 删除通知模板
export const removeNotifyTemplateList = (params: any) => {
	return http.post(`/notification/template/remove`, params);
};
// * 修改已读状态
export const readNotifyRecord = (params: any) => {
	return http.post(`/notification/record/read`, params);
};
// * 查询通知未读计数
export const subCountNotifyRecord = (params: any) => {
	return http.get(`/notification/record/subcount`, params);
};
// * 通知网关配置查询
export const getSender = (params: any) => {
	return http.get<any>(`/notification/sender/get`, params);
};
// * 通知网关配置更改
export const postSender = (params: any) => {
	return http.post(`/notification/sender/post`, params);
};
// * 查询Ali短信模板
export const getAliSms = (params: any) => {
	return http.get<any>(`/notification/template/find`, params);
};

// * 查询通知配置列表
export const getNotifyConfigList = (params: any) => {
	return http.get(`/notification/config/find`, params);
};
// * 添加通知配置
export const addNotifyConfigList = (params: any) => {
	return http.post(`/notification/config/add`, params);
};
// * 编辑通知配置
export const modifyNotifyConfigList = (params: any) => {
	return http.post(`/notification/config/modify`, params);
};
// * 删除通知配置
export const removeNotifyConfigList = (params: any) => {
	return http.post(`/notification/config/remove`, params);
};
// * 调用通知配置
export const invokeNotifyConfigList = (params: any) => {
	return http.post(`/notification/config/invoke`, params);
};
